Allow privileged build to be used in non-priv domain without crashing.
3e5a4e673p7PEOyHFm3nHkYX6HQYBg linux-2.4.26-xen-sparse/include/asm-xen/irq.h
3ead095db_LRUXnxaqs0dA1DWhPoQQ linux-2.4.26-xen-sparse/include/asm-xen/keyboard.h
3e5a4e678ddsQOpbSiRdy1GRcDc9WA linux-2.4.26-xen-sparse/include/asm-xen/mmu_context.h
+40d06e5b2YWInUX1Xv9amVANwd_2Xg linux-2.4.26-xen-sparse/include/asm-xen/module.h
3f8707e7ZmZ6TxyX0ZUEfvhA2Pb_xQ linux-2.4.26-xen-sparse/include/asm-xen/msr.h
3e7270deQqtGPSnFxcW4AvJZuTUWfg linux-2.4.26-xen-sparse/include/asm-xen/multicall.h
3e5a4e67mnQfh-R8KcQCaVo2Oho6yg linux-2.4.26-xen-sparse/include/asm-xen/page.h
*.pyc
*.so
*.so.*
+*.tar.gz
*~
BitKeeper/*/*
PENDING/*
extras/mini-os/h/hypervisor-ifs
install
install/*
-linux-*-xen/*
-linux-*.tar.gz
linux-2.4.26-xen/*
linux-xen-sparse
tools/*/build/lib*/*.py
tools/misc/xen_cpuperf
tools/misc/xen_log
tools/misc/xen_read_console
-tools/xend-2004-06-10_1309.tgz
tools/xentrace/xentrace
xen/drivers/pci/classlist.h
xen/drivers/pci/devlist.h
void blkdev_suspend(void)
{
- /* XXX FIXME */
- BUG();
}
void blkdev_resume(void)
{
- /* XXX FIXME */
- BUG();
}
}
#define MULTIVIF
-//#ifdef MULTIVIF
/** Network interface info. */
struct netif_ctrl {
int err;
};
-static struct netif_ctrl netctrl = {};
+static struct netif_ctrl netctrl;
-static void netctrl_init(void){
- netctrl = (struct netif_ctrl){};
+static void netctrl_init(void)
+{
+ memset(&netctrl, 0, sizeof(netctrl));
netctrl.interface_n = -1;
}
return connected;
}
-//#endif
-
static int network_open(struct net_device *dev)
{
struct net_private *np = dev->priv;
struct net_device *dev;
struct net_private *np;
-//#ifdef MULTIVIF
- if(netctrl.interface_n <= 0){
+ if ( netctrl.interface_n <= 0 )
+ {
printk(KERN_WARNING "Status change: no interfaces\n");
return;
}
-//#endif
+
dev = find_dev_by_handle(status->handle);
if(!dev){
printk(KERN_WARNING "Status change: invalid netif handle %u\n",
return err;
}
-//#ifdef MULTIVIF
-/** Initialize the network control interface. Set the number of network devices
+/*
+ * Initialize the network control interface. Set the number of network devices
* and create them.
*/
-static void netif_driver_status_change(netif_fe_driver_status_changed_t *status)
+static void netif_driver_status_change(
+ netif_fe_driver_status_changed_t *status)
{
int err = 0;
int i;
}
}
}
-//#endif
-
static void netif_ctrlif_rx(ctrl_msg_t *msg, unsigned long id)
{
int respond = 1;
+
switch ( msg->subtype )
{
case CMSG_NETIF_FE_INTERFACE_STATUS_CHANGED:
netif_status_change((netif_fe_interface_status_changed_t *)
&msg->msg[0]);
break;
-//#ifdef MULTIVIF
+
case CMSG_NETIF_FE_DRIVER_STATUS_CHANGED:
if ( msg->length != sizeof(netif_fe_driver_status_changed_t) )
goto error;
netif_driver_status_change((netif_fe_driver_status_changed_t *)
&msg->msg[0]);
- // Message is a response, so do not respond.
+ /* Message is a response */
respond = 0;
break;
-//#endif
- error:
+
+ error:
default:
msg->length = 0;
break;
}
- if(respond){
+
+ if ( respond )
ctrl_if_send_response(msg);
- }
}
#ifdef MULTIVIF
/* Wait for all interfaces to be connected. */
- for(wait_i = 0; 1; wait_i++) {
- if(wait_i < wait_n){
- err = netctrl_connected();
- } else {
- err = -ENETDOWN;
- }
- if(err < 0) goto exit;
- if(err > 0){
- err = 0;
+ for ( wait_i = 0; ; wait_i++)
+ {
+ if ( (err = (wait_i < wait_n) ? netctrl_connected() : -ENETDOWN) != 0 )
+ {
+ err = (err > 0) ? 0 : err;
break;
}
set_current_state(TASK_INTERRUPTIBLE);
}
#endif
- exit:
- if(err) cleanup_module();
+ if ( err )
+ ctrl_if_unregister_receiver(CMSG_NETIF_FE, netif_ctrlif_rx);
+
return err;
}
*cmdline_p = command_line;
}
+/*
+ * Every exception-fixup table is sorted (i.e., kernel main table, and every
+ * module table. Some elements may be out of order if they reference text.init,
+ * for example.
+ */
+static void sort_exception_table(struct exception_table_entry *start,
+ struct exception_table_entry *end)
+{
+ struct exception_table_entry *p, *q, tmp;
+
+ for ( p = start; p < end; p++ )
+ {
+ for ( q = p-1; q > start; q-- )
+ if ( p->insn > q->insn )
+ break;
+ if ( ++q != p )
+ {
+ tmp = *p;
+ memmove(q+1, q, (p-q)*sizeof(*p));
+ *q = tmp;
+ }
+ }
+}
+
+int xen_module_init(struct module *mod)
+{
+ sort_exception_table(mod->ex_table_start, mod->ex_table_end);
+ return 0;
+}
+
void __init setup_arch(char **cmdline_p)
{
unsigned long bootmap_size, start_pfn, max_low_pfn;
extern unsigned long cpu0_pte_quicklist[];
extern unsigned long cpu0_pgd_quicklist[];
+ extern const struct exception_table_entry __start___ex_table[];
+ extern const struct exception_table_entry __stop___ex_table[];
+
/* Force a quick death if the kernel panics. */
extern int panic_timeout;
if ( panic_timeout == 0 )
panic_timeout = 1;
+ /* Ensure that the kernel exception-fixup table is sorted. */
+ sort_exception_table(__start___ex_table, __stop___ex_table);
+
#ifndef CONFIG_HIGHIO
blk_nohighio = 1;
#endif
}
_end = . ;
- /* Sections to be discarded */
- /DISCARD/ : {
- *(.text.exit)
- *(.data.exit)
- *(.exitcall.exit)
- }
-
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
#ifdef SLOW_IO_BY_JUMPING
#define __SLOW_DOWN_IO "\njmp 1f\n1:\tjmp 1f\n1:"
-#else
+#elif defined(__UNSAFE_IO__)
#define __SLOW_DOWN_IO "\noutb %%al,$0x80"
+#else
+#define __SLOW_DOWN_IO "\n1: outb %%al,$0x80\n" \
+ "2:\n" \
+ ".section __ex_table,\"a\"\n\t" \
+ ".align 4\n\t" \
+ ".long 1b,2b\n" \
+ ".previous"
#endif
#ifdef REALLY_SLOW_IO
#define __OUT1(s,x) \
static inline void out##s(unsigned x value, unsigned short port) {
+#ifdef __UNSAFE_IO__
#define __OUT2(s,s1,s2) \
__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
+#else
+#define __OUT2(s,s1,s2) \
+__asm__ __volatile__ ("1: out" #s " %" s1 "0,%" s2 "1\n" \
+ "2:\n" \
+ ".section __ex_table,\"a\"\n\t" \
+ ".align 4\n\t" \
+ ".long 1b,2b\n" \
+ ".previous"
+#endif
#if defined (CONFIG_MULTIQUAD) && !defined(STANDALONE)
#define __OUTQ(s,ss,x) /* Do the equivalent of the portio op on quads */ \
#define __IN1(s) \
static inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v;
+#ifdef __UNSAFE_IO__
#define __IN2(s,s1,s2) \
__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
+#else
+#define __IN2(s,s1,s2) \
+__asm__ __volatile__ ("1: in" #s " %" s2 "1,%" s1 "0\n" \
+ "2:\n" \
+ ".section .fixup,\"ax\"\n" \
+ "3: mov" #s " $~0,%" s1 "0\n\t" \
+ "jmp 2b\n" \
+ ".previous\n" \
+ ".section __ex_table,\"a\"\n\t" \
+ ".align 4\n\t" \
+ ".long 1b,3b\n" \
+ ".previous"
+#endif
#if !defined(CONFIG_MULTIQUAD) || defined(STANDALONE)
#define __IN(s,s1,i...) \
--- /dev/null
+#ifndef _ASM_I386_MODULE_H
+#define _ASM_I386_MODULE_H
+/*
+ * This file contains the i386 architecture specific module code.
+ */
+
+extern int xen_module_init(struct module *mod);
+
+#define module_map(x) vmalloc(x)
+#define module_unmap(x) vfree(x)
+#define module_arch_init(x) xen_module_init(x)
+#define arch_init_modules(x) do { } while (0)
+
+#endif /* _ASM_I386_MODULE_H */
ln -sf ../asm-i386/mman.h
ln -sf ../asm-i386/mmu.h
ln -sf ../asm-i386/mmx.h
-ln -sf ../asm-i386/module.h
ln -sf ../asm-i386/mpspec.h
ln -sf ../asm-i386/msgbuf.h
ln -sf ../asm-i386/mtrr.h